//
//  MVP_Presenter.m
//  DesignPattern
//
//  Created by jun on 2021/4/16.
//

#import "MVP_Presenter.h"


@implementation MVP_Presenter

-(void)getData{
    [self.http netGetURL:@"www.baidu.com" params:@{}];
}

-(void)onSeccuss:(id)responseObject{
    if ([_view respondsToSelector:@selector(onGetDataSuccess:)]) {
        [_view onGetDataSuccess:responseObject];
    }
}

-(void)onFail:(id)clientInfo errCode:(NSInteger)errCode errInfo:(NSString *)errInfo{
    if ([_view respondsToSelector:@selector(onGetDataFail:des:)]) {
        [_view onGetDataFail:errCode des:errInfo];
    }
}

@end
